﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace U9API.JsonModel
{
    public class APIResponse
    {
        public string code;
        public string message;
        public int successful;
        public object data;
        public void SetError(String msg)
        {
            this.successful = 1;
            this.message = "ERP_Error:" + msg.Replace("[","(").Replace("]",")");
        }
        public void SetSuccessed(object data)
        {
            this.successful = 0;
            this.message = "";
            this.data = data;
        }
    }
}
